using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Shapes;
using UnityEngine;

namespace Gp.Other {
    public class MoveDestinationMarker : MonoBehaviour {

        [SerializeField] private Animation blinkAnimation;
        
        public void BlinkClear() {
            PlayAnimation(1);
        }
        

        public void ReBlink() {
            PlayAnimation(-1);
        }


        public void PlayAnimation(float speed) {
            var state = blinkAnimation["Round"];
            state.time = speed <= 0 ? state.clip.length : 0;
            state.speed = speed;
            blinkAnimation.Play("Round");
        }
    }
}